home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / 000134_amos-request@svcs1.digex.net_Tue Apr 15 23:48:32 1997.msg < prev    next >
Text File  |  1998-06-24  |  3KB  |  73 lines

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id XAA08244
  3.     for <mcox@access.digex.net>; Tue, 15 Apr 1997 23:48:31 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id WAA14424
  6.     for amos-out; Tue, 15 Apr 1997 22:13:16 -0400 (EDT)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id WAA14421
  9.     for <amos-list@svcs1.digex.net>; Tue, 15 Apr 1997 22:13:15 -0400 (EDT)
  10. Received: from dealer.aristocrat.com.au (dealer.aristocrat.com.au [203.16.181.81])
  11.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id WAA01924
  12.     for <amos-list@access.digex.net>; Tue, 15 Apr 1997 22:13:09 -0400 (EDT)
  13. Received: by dealer.aristocrat.com.au (8.7.5/8.7.3) with SMTP id MAA10307 for <amos-list@access.digex.net>; Wed, 16 Apr 1997 12:17:03 +1000 (EST)
  14. Received: by club.aristocrat.com.au (Interworks_SMTPpost 8.100 June 5, 1996)
  15.         id AA01; Wed, 16 Apr 1997 12:13:23 
  16. From: AW@null.net (Adam Wilkinson)
  17. Reply-To: AW@null.net (Adam Wilkinson)
  18. Subject: Re: Line problems
  19. In-Reply-To: <861139415.0918137.0@h144.redrose.net>
  20.              (from Mush <mpd@mushy-pd.demon.co.uk>)
  21.              (on Tue, 15 Apr 97 17:31:18)
  22. Lines: 42
  23. X-Mailer: ADMail 1.7 Copyright 1995 S.T.Brown
  24. To: amos-list@access.digex.net
  25. Date: Wed, 16 Apr 1997 12:13:23 
  26. Message-ID: <19970416.86CD3D8.B055@club.aristocrat.com.au>
  27. Status: O
  28. X-Status: 
  29.  
  30. Hi Mush,
  31.  
  32. > >> OK, ill try and explain this problem again. Im making a perspective
  33. > >> box/rectangle, so naturally, one end will be close, and the other end
  34. > >> smaller, so simulate the depth of the box. Here is an example: (crap
  35. > ASCII art)
  36. > I know the top coords of the 2 lines drawn, but it is the top and bottom Y
  37. > coordinates on the actual SLOPES that I need to know quickly
  38.  
  39. It sounds like you are already using run length slicing.
  40. This is just about the fastest way of drawing a line IF you are coding in
  41. assembly.
  42.  
  43. You could speed up the inner loop by checking for the gradient before you
  44. start the loop and branching to four seperate routines depending on the
  45. gradient.
  46.  
  47.  
  48.     /<--45%
  49. |1 /
  50. | / 2    
  51. |/____
  52. |\  
  53. | \ 3
  54. |4 \
  55.  
  56. You probably know that already, can you be a little more specific about
  57. what you need? what are you actually doing with the result, and how is this
  58. function to be called? do you calc every value from left to right? do you
  59. need multiple y values for a single x in quadrants 1 and 4.
  60.  
  61. I guess you use 'If' to avoid a divide?
  62.  
  63. Division is slow. The bitwise Ror is a faster way to divde by 2. that would
  64. at least give you the centre of the line, I think AMOSPro auto converts
  65. those divisions, but the point is to divide by 2 or 4, not 5...
  66.  
  67. Hope this helps...
  68.  
  69. -- 
  70. Adam.
  71.  
  72.